{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "867a20bc",
   "metadata": {},
   "source": [
    "# ISAM2\n",
    "\n",
    "## Overview\n",
    "\n",
    "The `ISAM2` class in GTSAM is an incremental smoothing and mapping algorithm that efficiently updates the solution to a nonlinear optimization problem as new measurements are added. This class is particularly useful in applications such as SLAM (Simultaneous Localization and Mapping) where real-time performance is crucial.  \n",
    "\n",
    "The algorithm is described in the 2012 IJJR paper by {cite:t}`http://dx.doi.org/10.1177/0278364911430419`. For background, also see the more recent booklet by {cite:t}`https://doi.org/10.1561/2300000043`.\n",
    "\n",
    "## Key Features\n",
    "\n",
    "- **Incremental Updates**: `ISAM2` allows for incremental updates to the factor graph, avoiding the need to solve the entire problem from scratch with each new measurement.\n",
    "- **Nonlinear Optimization**: Capable of handling nonlinear systems, leveraging iterative optimization techniques to refine estimates.\n",
    "- **Efficient Variable Reordering**: Dynamically reorders variables to maintain sparsity and improve computational efficiency."
   ]
  },
  {
   "cell_type": "markdown",
   "id": "9ce0ec12",
   "metadata": {},
   "source": [
    "## Main Methods\n",
    "\n",
    "### Initialization and Configuration\n",
    "\n",
    "- **ISAM2 Constructor**: Initializes the `ISAM2` object with optional parameters for configuring the behavior of the algorithm, such as relinearization thresholds and ordering strategies.\n",
    "\n",
    "### Updating the Graph\n",
    "\n",
    "- **update**: Incorporates new factors and variables into the existing factor graph. This method performs the core incremental update, refining the solution based on new measurements.\n",
    "\n",
    "### Accessing Results\n",
    "\n",
    "- **calculateEstimate**: Retrieves the current estimate of the variables in the factor graph. This method can be called with specific variable keys to obtain their estimates.\n",
    "- **marginalCovariance**: Computes the marginal covariance of a specified variable, providing insight into the uncertainty of the estimate.\n",
    "\n",
    "### Advanced Features\n",
    "\n",
    "- **getFactorsUnsafe**: Provides access to the internal factor graph, allowing for advanced manipulations and custom analysis."
   ]
  }
 ],
 "metadata": {
  "language_info": {
   "name": "python"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
